using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class volume : MonoBehaviour
{
    private AudioSource groundAudio;
    private Slider audioSilder;
    
    // Start is called before the first frame update
    void Start()
    {
        groundAudio = GameObject.FindGameObjectWithTag("ground").transform.GetComponent<AudioSource>();
        audioSilder = GetComponent<Slider>();
    }

    // Update is called once per frame
    void Update()
    {
        VolumeControll();
        //CloseGameSettingUI();
    }
    public void VolumeControll()
    {
        groundAudio.volume = audioSilder.value;
    }

   

}
